home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Classes / Math.as < prev    next >
Encoding:
Text File  |  2004-06-14  |  4.1 KB  |  31 lines

  1. class Math
  2. {
  3.     var E                                                                // Constant. A mathematical constant for the base of natural logarithms, expressed as e. The approximate value of e is 2.71828.
  4.     var LN2                                                              // Constant; a mathematical constant for the natural logarithm of 2, expressed as loge2, with an approximate value of 0.69314718055994528623.
  5.     var LOG2E                                                            // Constant; a mathematical constant for the base-2 logarithm of the constant e (Math.E), expressed as log2e, with an approximate value of 1.442695040888963387.
  6.     var LOG10E                                                           // Constant; a mathematical constant for the base-10 logarithm of the constant e (Math.E), expressed as log10e, with an approximate value of 0.43429448190325181667.
  7.     var LN10                                                             // Constant; a mathematical constant for the natural logarithm of 10, expressed as loge10, with an approximate value of 2.3025850929940459011.
  8.     var PI                                                               // Constant; a mathematical constant for the ratio of the circumference of a circle to its diameter, expressed as pi, with a value of 3.14159265358979.
  9.     var SQRT1_2                                                          // Constant; a mathematical constant for the square root of one-half.
  10.     var SQRT2                                                            // Constant; a mathematical constant for the square root of 2, with an approximate value of 1.414213562373.
  11.  
  12.     function abs(x)                                                      // It computes and returns an absolute value for the number specified by the parameter x.
  13.     function acos(x)                                                     // It computes and returns the arc cosine of the number specified in the parameter x, in radians.
  14.     function asin(x)                                                     // It computes and returns the arc sine for the number specified in the parameter x, in radians.
  15.     function atan(tangent)                                               // It computes and returns the value, in radians, of the angle whose tangent is specified in the parameter tangent. 
  16.     function atan2(x, y)                                                 // It computes and returns the angle of the point y/x in radians.
  17.     function ceil(x)                                                     // It returns the ceiling of the specified number or expression. 
  18.     function cos(x)                                                      // It returns the cosine of the angle specified by the parameter x.
  19.     function exp(x)                                                      // It returns the value of the base of the natural logarithm (e), to the power of the exponent. 
  20.     function floor(x)                                                    // It returns the floor of the number or expression.
  21.     function log(x)                                                      // It returns the logarithm of parameter x.
  22.     function max(x, y)                                                   // It evaluates x and y and returns the larger value.
  23.     function min(x, y)                                                   // It evaluates x and y and returns the smaller value.
  24.     function pow(x, y)                                                   // It computes and returns x to the power of y: xy.
  25.     function random()                                                    // It returns n, where 0 <= n < 1.
  26.     function round(x)                                                    // It rounds the value of the parameter x up or down to the nearest integer and returns the value.
  27.     function sin(x)                                                      // It computes and returns the sine of the specified angle in radians. 
  28.     function sqrt(x)                                                     // It computes and returns the square root of the specified number.
  29.     function tan(x)                                                      // It computes and returns the tangent of the specified angle. 
  30. }
  31.